package androidlab.sprintingsquirrel;

import org.andengine.engine.camera.Camera;
import org.andengine.entity.scene.background.Background;
import org.andengine.entity.sprite.Sprite;
import org.andengine.opengl.util.GLState;
import org.andengine.util.color.Color;

import androidlab.sprintingsquirrel.BaseScene;
import androidlab.sprintingsquirrel.SceneManager.SceneType;

public class LoadingScene extends BaseScene {
	
	private Sprite loading;
	
    @Override
    public void createScene() {
        setBackground(new Background(Color.WHITE));
        
        loading = new Sprite(0, 0, resourceManager.loadingTR, vbom) {
		    @Override
		    protected void preDraw(GLState pGLState, Camera pCamera) {
		       super.preDraw(pGLState, pCamera);
		       pGLState.enableDither();
		    }
		};
		
		loading.setPosition((camera.getWidth()-loading.getWidth())/2, (camera.getHeight()-loading.getHeight())/2);
		attachChild(loading);
    }

    @Override
    public void onBackKeyPressed() {
        return;
    }

    @Override
    public SceneType getSceneType() {
    	return SceneType.LOADING;
    }

    @Override
    public void disposeScene() {
    	
    }
}
